import request from "@/utils/request"
import type { loginResult } from "./type/user"
export const getCaptcha
    = () => {
        return request<loginResult>("/api/captcha", "GET",)
    }


export const loginApi = (loginParams: {
    username: string
    password: number
    captcha: string

}) => {
    return request<loginResult>("/api/users/login", "POST", loginParams)
}

export const getUserInfoApi = () => {
    return request<any>("/api/users/current", "GET")
}
